USE [CallCenter]
GO

/****** Object:  StoredProcedure [dbo].[sp_add_scheduleCall]    Script Date: 07/04/2013 07:56:11 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


CREATE proc [dbo].[sp_add_scheduleCall]
(
@subject varchar(50),
@date varchar(50),
@note varchar(100),
@IsIncoming int,
@userId int,
@prospectId int
)
as

begin
BEGIN TRAN
	INSERT INTO ScheduleCall VALUES (@prospectId, @userid, @subject, @date, @note, null, @IsIncoming)
	
	INSERT INTO Historys VALUES ('Add Schedule',@userid, GETDATE(), 'Add Schedule for Prospect', @prospectId, null )
COMMIT
end



GO


